{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li><a href="{php echo web_url('agentset/agentSetTags/tags',array('type'=>0))}">商户标签</a></li>
	<li><a href="{php echo web_url('agentset/agentSetTags/tags',array('type'=>1))}">抢购标签</a></li>
	<li><a href="{php echo web_url('agentset/agentSetTags/tags',array('type'=>2))}">拼团标签</a></li>
	{if p('groupon')}
	<li><a href="{php echo web_url('agentset/agentSetTags/tags',array('type'=>3))}">团购标签</a></li>
	{/if}
	<li {if empty($tag['id'])}class="active"{/if}><a href="{php echo web_url('agentset/agentSetTags/tagsedit')}">添加标签</a></li>
	{if !empty($tag['id'])}
	<li class="active"><a href="#">编辑标签</a></li>
	{/if}
</ul>
<div class="app-content">
    <div class="app-form">
        <form action="" method="post" class="form-horizontal form form-validate"  >
            <input type="hidden" name="tagid" value="{$tag['id']}" />
            <div class="panel panel-default">
                <div class="panel-heading">标签设置</div>
                <div class="panel-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标签标题<span class="must-fill">*</span></label>
                        <div class="col-sm-9">
                            <input type="text" name="tag[title]" required  autocomplete="off" class="form-control" value="{$tag['title']}" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标签内容</label>
                        <div class="col-sm-9">
                            <input type="text" name="tag[content]" autocomplete="off" class="form-control" value="{$tag['content']}" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">标签类型</label>
                        <div class="col-sm-9">
                            <select name="tag[type]" class="form-control">
                                <option value="0" {if $tag['type'] == 0 || empty($tag['type'])} selected="selected" {/if} >商户标签</option>
                                <option value="1" {if $tag['type'] == 1} selected="selected" {/if} >抢购标签</option>
                                <option value="2" {if $tag['type'] == 2} selected="selected" {/if} >拼团标签</option>
                                {if p('groupon')}
                                <option value="3" {if $tag['type'] == 3} selected="selected" {/if} >团购标签</option>
                                {/if}
                                {if p('bargain')}
                                <option value="4" {if $tag['type'] == 4} selected="selected" {/if} >砍价标签</option>
                                {/if}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序</label>
                        <div class="col-sm-9">
                            <input type="number" min="0" name="tag[sort]"  autocomplete="off" class="form-control" value="{$tag['sort']}" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否显示</label>
                        <div class="col-sm-9">
                            <label class="radio-inline">
                                <input type="radio" name='enabled' value='1' {if $tag['enabled']==1}checked{/if}>是
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name='enabled' value='0' {if $tag['enabled']==0 || empty($tag['enabled']) }checked{/if}>否
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-9">
                    <input type="submit" name="submit" value="提交" class="btn btn-primary min-width" />
                    <input type="hidden" name="token" value="{$_W['token']}" />
                </div>
            </div>
        </form>
    </div>
</div>
<script>
	myrequire(['layui'],function(){
		layui.use(['layer','form','laydate'], function(){
		  	var layer = layui.layer,
			form = layui.form();
		});
	});
</script>
{php include wl_template('common/footer');}